package ch.ti.bfh.app.loodel.domain.invitation;

import ch.ti.bfh.app.loodel.domain.member.Member;
import ch.ti.bfh.app.loodel.internal.repository.GlobalRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface LearningEventInvitationRepository extends GlobalRepository<LearningEventInvitation, Long> {

    @Query("Select invitation.recipient From MemberLearningEventInvitation as invitation where invitation.learningEvent.id = :learningEventId")
    public List<Member> findInvitedMembers(@Param("learningEventId") Long learningEventId);

}
